package com.qf.controller;

import com.qf.entity.Stock;
import com.qf.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 你的名字
 * @Date: 2021/07/10/15:31
 * @Description:
 */
@RestController
@RequestMapping("/stock")
public class StockeController {
    @Autowired
    private StockService stockService;

    @RequestMapping("/addStock")
    public boolean addStock(@RequestBody Stock stock){
        System.out.println(stock.getGid());
        boolean save = stockService.save(stock);
        return save;
    }
}
